package xinxin.com.AbstractFactoryPatternWithSimpleFactory;

import xinxin.com.AbstractFactoryPatternWithSimpleFactory.DataBase.DataBase;
import xinxin.com.AbstractFactoryPatternWithSimpleFactory.DataObject.Department;
import xinxin.com.AbstractFactoryPatternWithSimpleFactory.DataObject.User;
import xinxin.com.AbstractFactoryPatternWithSimpleFactory.Sql.IDepartment;
import xinxin.com.AbstractFactoryPatternWithSimpleFactory.Sql.IUser;

/**
 * @author ：史鑫鑫
 * @date ：Created in 2019/3/25 21:14
 */
public class AbstractFactoryPatternWithSimpleFactory {
    public static void main(String[] args) {
        User user = new User();
        Department department = new Department();

        IUser iUser = DataBase.createUser();
        iUser.Insert(user);
        iUser.GetUser(1);

        IDepartment iDepartment = DataBase.createDepartment();
        iDepartment.Insert(department);
        iDepartment.GetDepartment(1);

    }
}
